package com.white.server.impl;

import java.io.IOException;
import java.io.ObjectInputStream;

public class ClientListen implements Runnable {
    private ObjectInputStream inputStream;
    public ClientListen(ObjectInputStream inputStream) {
        this.inputStream = inputStream;
    }

    @Override
    public void run() {
        while (true) {
            try {
                System.out.println("接收服务器：" + inputStream.readObject());
            } catch (IOException | ClassNotFoundException e) {
                e.printStackTrace();
            }
        }
    }
}
